/*
 * IUserLDAPAuthenService.java
 * Created on Mar 28, 2005
 *
 * Project: Seagate Leave, Time & Attendance Management System
 * @Description: com.seagate.service.security
 */
package com.mycompany.app.hr.security.service.ldap;

import javax.naming.NamingException;

import com.mycompany.app.hr.security.exception.UserPassowrdNotMatchInLDAPException;



/**
 * @author betty.peng
 * @version: 1.0, Mar 28, 2005
 * @Description: IUserLDAPAuthenService
 */
public interface IUserLDAPAuthenService {
    /**
     * @Description: check user authentication in the ldap database.
     * @param username
     * @param password
     */
    public boolean userAuthen(String username, String password)
            throws NamingException;

    /**
     * @Description: create user into ldap database.
     * @param username
     * @param password
     */
    public void addUserAuthen(String username, String lastName,
            String firstName, String middleName, String mail, String password)
            throws NamingException;

    /**
     * @Description: delete user from ldap database
     * @param username
     * @param password
     */
    public void deleteUserAuthen(String username) throws NamingException;

    /**
     * @Description: change user's password by every user.
     * @param username
     * @param oldPassword
     * @param newPassword
     * @throws UserPassowrdNotMatchInLDAPException 
     * @throws NamingException 
     */
    public void changePassword(String username, String oldPassword,
            String newPassword) throws UserPassowrdNotMatchInLDAPException, NamingException;

    /**
     * @Description: reset the user password by administrator.
     * @param username
     * @param newPassword
     */
    public void resetPassword(String username, String newPassword)
            throws NamingException;

    /**
     * @Description: update the user email Address.
     * @param username
     * @param emailAddr
     */
    public void updateEmailAddress(String username, String emailAddr)
            throws NamingException;

    /**
     * @Description: update the basic name info of the current user. It's not
     *               necessary for us to maintain the info now.
     * @param username
     * @param lastName
     * @param firstName
     * @param middleName
     */
    public void updateNameInfo(String username, String lastName,
            String firstName, String middleName) throws NamingException;

    /**
     * @Description: get the user info from ldap database.
     * @param username
     * @return LDAPUserInfoVO
     * @throws NamingException
     */
    //public LDAPUserInfoVO getLDAPUserInfo (String username) throws NamingException;
}
